<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePermissionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('permissions', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string("route_name",50)->unique()->comment("路由名称");
            $table->string("intro")->unique()->comment("路由介绍");
            $table->string("method",10)->default('GET')->comment("http方法");
            $table->string("guard_name",20)->nullable()->comment("guard");
            $table->integer("level")->default(1)->comment("排序");
            $table->integer("menu_id")->default(0)->comment("菜单id");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('permissions');
    }
}
